﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace iTeamyou.LTS.Core.Models
{
    public class SyncSupplier
	{
        /// <summary>
        /// 同步标识
        /// </summary>
        public string SyncId { get; set; }

        /// <summary>
        /// 系统唯一标识
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 供应商编号（短）
        /// 目前用于关联同步
        /// </summary>
        public string? RefId { get; set; }

        /// <summary>
        /// 供应商编号（长）
        /// </summary>
        [DisplayName("供应商编号")]
        [Description("供应商编号")]
        //[Required(ErrorMessage = "供应商编号不能为空")]
        public string? SId { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [DisplayName("供应商名称")]
        [Description("供应商名称")]
        [Required(ErrorMessage = "供应商名称不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        [DisplayName("联系人")]
        [Description("联系人")]
        //[Required(ErrorMessage = "联系人不能为空")]
        public string? Contact { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [DisplayName("联系电话")]
        [Description("联系电话")]
        public string? ContactNumber { get; set; }

        /// <summary>
        /// 区域
        /// </summary>
        [DisplayName("区域")]
        [Description("区域")]
        //[Required(ErrorMessage = "区域不能为空")]
        public Region Region { get; set; }

        /// <summary>
        /// 同步时间
        /// </summary>
        [DisplayName("同步时间")]
        [Description("同步时间")]
        public DateTime? SyncTime { get; set; }

        /// <summary>
        /// 同步来源
        /// </summary>
        [DisplayName("同步来源")]
        [Description("同步来源")]
        public string SyncFrom { get; set; }

        /// <summary>
        /// 同步数据是否已使用
        /// </summary>
        public bool IsSynced { get; set; }

        ///// <summary>
        ///// 状态
        ///// </summary>
        //[DisplayName("状态")]
        //[Description("状态")]
        ////[Required(ErrorMessage = "状态不能为空")]
        //public Status? Status { get; set; }
    }

    public class SyncBarcode
    {
        /// <summary>
        /// 同步标识
        /// </summary>
        public string SyncId { get; set; }

        public string PId { get; set; }

        public string UPC { get; set; }

        /// <summary>
        /// 同步时间
        /// </summary>
        [DisplayName("同步时间")]
        [Description("同步时间")]
        public DateTime? SyncTime { get; set; }

        /// <summary>
        /// 同步来源
        /// </summary>
        [DisplayName("同步来源")]
        [Description("同步来源")]
        public string SyncFrom { get; set; }

        /// <summary>
        /// 同步数据是否已使用
        /// </summary>
        public bool IsSynced { get; set; }
    }

    public class SyncProduct
    {
        /// <summary>
        /// 同步标识
        /// </summary>
        public string SyncId { get; set; }

        /// <summary>
        /// 系统唯一编号
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// SKU编号
        /// </summary>
        [DisplayName("SKU")]
        [Description("SKU")]
        public string? PId { get; set; }

        /// <summary>
        /// UPC编号
        /// </summary>
        [DisplayName("UPC")]
        [Description("UPC")]
        public string? UPC { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [DisplayName("商品名称")]
        [Description("商品名称")]
        public string Name { get; set; }

        /// <summary>
        /// 供应商关联编码
        /// </summary>
        public string? SupplierRefId { get; set; }

        /// <summary>
        /// 产地
        /// </summary>
        [DisplayName("产地")]
        [Description("产地")]
        public string? OriginPlace { get; set; }

        /// <summary>
        /// 商品规格
        /// </summary>
        [DisplayName("商品规格")]
        [Description("商品规格")]
        public string? Specification { get; set; }

        /// <summary>
        /// 商品细分类
        /// </summary>
        public string? SectionId { get; set; }

        /// <summary>
        /// 同步时间
        /// </summary>
        [DisplayName("同步时间")]
        [Description("同步时间")]
        public DateTime? SyncTime { get; set; }

        /// <summary>
        /// 同步来源
        /// </summary>
        [DisplayName("同步来源")]
        [Description("同步来源")]
        public string SyncFrom { get; set; }

        /// <summary>
        /// 同步数据是否已使用
        /// </summary>
        public bool IsSynced { get; set; }
    }

    public class SyncBatch
    {
        /// <summary>
        /// 同步标识
        /// </summary>
        public string SyncId { get; set; }

        /// <summary>
        /// 系统唯一编号
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 批次ID
        /// </summary>
        [DisplayName("批次ID")]
        [Description("批次ID")]
        public string BId { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        [DisplayName("批次号")]
        [Description("批次号")]
        public string Number { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [DisplayName("数量")]
        [Description("数量")]
        public int Quantity { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [DisplayName("商品名称")]
        [Description("商品名称")]
        public string? ProductName { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [DisplayName("供应商名称")]
        [Description("供应商名称")]
        public string? SupplierName { get; set; }

        /// <summary>
        /// 商品SKU
        /// </summary>
        [DisplayName("SKU")]
        [Description("SKU")]
        public string? ProductSKU { get; set; }

        /// <summary>
        /// 采购订单号
        /// </summary>
        [DisplayName("采购订单号")]
        [Description("采购订单号")]
        public string OrderNumber { get; set; }

        /// <summary>
        /// 入库时间
        /// </summary>
        [DisplayName("入库时间")]
        [Description("入库时间")]
        public DateTime? EntryDatetime { get; set; }

        /// <summary>
        /// 入库单号
        /// </summary>
        [DisplayName("入库单号")]
        [Description("入库单号")]
        public string WarehouseNumber { get; set; }

        /// <summary>
        /// 到期日期
        /// </summary>
        [DisplayName("到期日期")]
        [Description("到期日期")]
        public DateTime? DateDue { get; set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        [DisplayName("生产日期")]
        [Description("生产日期")]
        public DateTime? ProducedDate { get; set; }

        /// <summary>
        /// 同步时间
        /// </summary>
        [DisplayName("同步时间")]
        [Description("同步时间")]
        public DateTime? SyncTime { get; set; }

        /// <summary>
        /// 同步来源
        /// </summary>
        [DisplayName("同步来源")]
        [Description("同步来源")]
        public string SyncFrom { get; set; }

        /// <summary>
        /// 同步数据是否已使用
        /// </summary>
        public bool IsSynced { get; set; }
    }
}

